package com.nba.common.exception;

import com.alibaba.fastjson.JSONArray;
import com.nba.common.utils.EnumVal;

/**
 * @author Jesse
 * user defined exception
 */
public class CustomException extends BaseServiceException {

	/**
	 * 域 <code>serialVersionUID</code>
	 */
	private static final long serialVersionUID = 1L;
	public CustomException() {
		super();
	}

	public CustomException(EnumVal errorCode) {
		super(errorCode);
	}

	public CustomException(EnumVal errorCode, Throwable cause) {
        super(errorCode, cause);
    }

    public CustomException(int code, String msg) {
        super(code, msg);
    }


    public CustomException(int code, String msg, Throwable cause) {
        super(code, msg, cause);
    }
    
    /**
	 * 异常测试方法入口
     * @param args
     */
    public static void main(String[] args) {
        try {
	        throw new CustomException(ErrorCode.PARAM_VALIDATE);
        }catch(CustomException e){
            System.out.println(e.getMessage());
            System.out.println(e.getCode());
        }catch (Exception e1){

        }
    }
}
